const http = require('http')
http.createServer((request, response) => {
    console.log('request come', request.url)
    response.writeHead(200,{
        'Access-Control-Allow-Origin':'*',
        'Access-Control-Allow-Headers':'X-Test-Cors',  // 允许自定义请求头
        'Access-Control-Allow-Methods':'POST,PUT,Delete', // 允许的请求方法
        'Access-Control-Max-Age':'1000', // 请求最长有效期
    })
    response.end('123')
}).listen(8887)
console.log('server listening on 8887')
